<?php
		$chars = array( 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M','N','O','P','Q','R','S','T','U','V','W','X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0');
		$max_chars = count($chars) - 1;		
		$temp = "";
		$insert_code = "";
		for($i = 0; $i < 7; $i++)
		for($i = 0; $i < 7; $i++)
		{
		$temp = rand(0, $max_chars);
		$insert_code = ( $i == 0 ) ? $chars[$temp] : $insert_code . $chars[$temp];
		$secure_code = ( $i == 0 ) ? $chars[$temp] : $secure_code . " " . $chars[$temp];
		}
		$secure_code = "<b><font color=red>" . $secure_code . "</font></b>";
		$del_time = time() - 120;//20s
		$ds="DELETE FROM antispam WHERE anti_time < $del_time";
		$kq_ds=mysql_query($ds);
		$ds1="insert into antispam(anti_code,anti_time) values('".$insert_code."',".time().")";		
		$kq_ds1=mysql_query($ds1);
		echo $secure_code;		
	?>